package com.yitong.equipment.entity.other

import android.os.Parcel
import android.os.Parcelable

class RightBean(): Parcelable {
    var name: String? = null
    var titleName: String? = null
    var tag: String? = null
    var isTitle = false
    var imgsrc: String? = null

   constructor(name: String?) : this() {
        this.name = name
    }

    constructor(parcel: Parcel) : this() {
        name = parcel.readString()
        titleName = parcel.readString()
        tag = parcel.readString()
        isTitle = parcel.readByte() != 0.toByte()
        imgsrc = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(name)
        parcel.writeString(titleName)
        parcel.writeString(tag)
        parcel.writeByte(if (isTitle) 1 else 0)
        parcel.writeString(imgsrc)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<RightBean> {
        override fun createFromParcel(parcel: Parcel): RightBean {
            return RightBean(parcel)
        }

        override fun newArray(size: Int): Array<RightBean?> {
            return arrayOfNulls(size)
        }
    }
}